<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">

<head th:include="base/page/header :: headerTiFragment" />

<body>
	<div th:include="base/page/menu-admin :: menuTiFragment"></div>
	<div class="container">
		<form id="form"  th:action="@{/base/page/admin/project/updateproject}" th:object="${project}" role="form" class="form-horizontal" method="post">
			<fieldset>
				<legend class="text-info">Edit Project</legend>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">*Project Name</label>
					<div class="col-lg-3">
						<input id="name" th:field="*{name}" placeholder="project name" class="form-control" type="text"/>
						<span th:if="${#fields.hasErrors('name')}" th:errors="*{name}" class="help-inline">Incorrect data</span>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">*Leader</label>
					<div class="col-lg-3">
						<select class="form-control" th:field="*{userUuid}">
							<option value="" selected="selected">--Select Leader--</option>
							<option th:each="user : ${users}" th:value="${user.uuid}" th:selected="${user.uuid} ? 'selected'" th:text="${user.fullName} == '' ? ${user.name} : ${user.fullName}"/>
						</select>
					</div>
				</div>
				<div class="form-group error">
					<label for="name" class="col-lg-2 control-label">Description</label>
					<div class="col-lg-3">
						<textarea id="description" rows="10" cols="100" th:field="*{description}" placeholder="description" class="form-control"></textarea>
						<span th:if="${#fields.hasErrors('description')}" th:errors="*{description}" class="help-inline">Incorrect data</span>
					</div>
				</div>
				<div class="form-group error"></div>
				<div class="form-group error"></div>
				<div class="form-group error">
					<div class="col-lg-2"></div>
					<div class="col-lg-3">
						<input id="id" th:field="*{uuid}" type="hidden"/>		
						<button class="btn btn-primary" type="submit">Save</button>&nbsp;&nbsp;&nbsp;							
						<button class="btn btn-default" type="reset">Reset</button>
					</div>
				</div>
			</fieldset>
		</form>
	</div>
</body>

</html>